//
// Created by liang on 2025/4/5.
//

#ifndef QT6_TEST_TASKWINDOW_H
#define QT6_TEST_TASKWINDOW_H

#include <QString>
#include <windows.h>

namespace SS{
    class TaskWindow {
    public:
        TaskWindow(QString name, HWND hwnd):
        windowName(name), windowHandle(hwnd){};
        TaskWindow(TaskWindow&& other) noexcept;
        TaskWindow(const TaskWindow& other) :windowName(other.windowName),
        windowHandle(other.windowHandle) {

        };
        TaskWindow& operator=(const TaskWindow& other){
            if (this != &other) {
                windowName = other.windowName;
                windowHandle = other.windowHandle;
            }
            return *this;
        };
        TaskWindow& operator=(TaskWindow&& other) noexcept {
            if (this != &other) {
                windowName = std::move(other.windowName);
                windowHandle = std::move(other.windowHandle);
                other.windowHandle = nullptr;
            }
            return *this;
        };
    public:
        QString windowName;
        HWND windowHandle;
    };

}


#endif //QT6_TEST_TASKWINDOW_H
